package cn.edu.ctbu.sbadmin.teacher.controller;

import cn.edu.ctbu.sbadmin.common.controller.BaseController;
import cn.edu.ctbu.sbadmin.lablog.domain.DimClassDO;
import cn.edu.ctbu.sbadmin.lablog.service.DimClassService;
import cn.edu.ctbu.sbadmin.lablog.service.LabLogInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TeacherLogInfoController extends BaseController {


    @Autowired
    DimClassService dimClassService;
    /**
     * {comments}管理的基础页面
     * @return
     */
    @RequestMapping("/teacher/labloginfo/list")
    @RequiresPermissions("teacher:labloginfo:list")
    public  String list(Long id, Model model)throws Exception{

        DimClassDO dimClassDO=dimClassService.getViewById(id);

        model.addAttribute("classCourse",dimClassDO);

        return "/teacher/labloginfo/list";
    }

    /**
     * {comments}管理的编辑及新增页面
     * @return
     */
    @RequestMapping("/teacher/labloginfo/edit")
    @RequiresPermissions("teacher:labloginfo:edit")
    public  String edit(){
        return "/teacher/labloginfo/edit";
    }

}
